<div>
    <form name="myForm" enctype="multipart/form-data">
        <fieldset>
            <legend>{{"导入文件"|translate}}</legend>
            <input type="file" ngf-select ng-model="picFile" name="file" a ngf-model-invalid="errorFile" ngf-keep="distinct">
            <button class="sui-btn btn-small btn-primary" ng-click="importf(picFile, $event)" ng-show="!records.length" ng-disabled="odj">{{"导入"|translate}}</button>
        </fieldset>
        <br>
    </form>
    <div>
        导入模板文件：<a href="{{mb}}" target="_blank">下载</a>
    </div>
    <div>
        注:必须填写参数 outer_id (商品外部编码) category（类型）sku_outer_id (sku外部编码) sku_price（价格） sku_stocks（库存）spec1（规格）attribute1（规格值）
    </div>
    <span class="sui-form sui-form" ng-if="type"> 
         导入成功共： <span class="sui-text-danger">{{suc}}</span> 
         导入失败共： <span class="sui-text-danger">{{err}}</span> 
         <!-- 已存在共： <span class="sui-text-info">{{info}}</span>  -->
         更新： <span class="sui-text-info">{{info}}</span>
    </span>
    <span class="sui-form sui-form pull-right" ng-if="savetype"> 
          <button class="sui-btn btn-primary" ng-click="save($event)">{{'save'|translate}}</button>
    </span>
    <table class="sui-table table-bordered" ng-if="savetype">
        <thead>
            <tr>
                <th>{{'外部编号'|translate}}</th>
                <th>{{'图片'|translate}}</th>
                <th>{{'title'|translate}}</th>
                <th>{{'price'|translate}}</th>
                <th>{{'类目'|translate}}</th>
                <th>{{'sku'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in records ">
            
                <td width="10%">
                    {{list.outer_id}}
                </td>
                <td width="20%">
                    <img ng-src="{{ list.img }}" width="60px" height="60px"  />
                    <img ng-src="{{ list.img1 }}" width="60px" height="60px" />
                    <img ng-src="{{ list.img2 }}" width="60px" height="60px" />
                    <img ng-src="{{ list.img3 }}" width="60px" height="60px"/>
                    <img ng-src="{{ list.img4 }}" width="60px" height="60px"  />
                </td>
                <td width="15%">
                    {{list.title}}
                    <br>
                    简称:
                     {{list.note}}
                </td>
                <td width="5%">
                    <input ng-model="list.price" style="width:50px">
                </td>
                <td>
                    {{list.category}}
                </td>
                <td width="45%">
                    <table class="sui-table table-bordered" ng-if="list.skus">
                        <thead>
                            <tr>
                                <th>{{'外部编号'|translate}}</th>
                                <th>{{'图片'|translate}}</th>
                                <th>{{'条码'|translate}}</th>
                                <th>{{'规格/属性'|translate}}</th>
                                <th>{{'操作'|translate}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="sub in list.skus">
                                <td>
                                    {{sub.sku_outer_id}}
                                </td>
                                <td><img  ng-src="{{ list.imgurl }}" style="width: 80px;height: 80px" /></td>
                                <td>
                                    {{sub.barcode}}
                                </td>
                                <td>
                                    {{sub.sku_properties}}
                                </td>
                                <td>
                                    价格：
                                    <input ng-model="sub.sku_price" style="width:50px">
                                    <br>
                                    库存:
                                    <input ng-model="sub.sku_stocks" style="width:50px">
                                </td>
                               
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td width="5%">
                    <span ng-show="list.status ==1" class="sui-text-success">成功</span>
                    <span ng-show="list.status ==2" class="sui-text-danger">失败</span>
                    <span ng-show="list.status ==3" class="sui-text-info">已经存在</span>
                </td>
            </tr>
        </tbody>
    </table>
</div>